#ifndef _FIND_MIN_DIST_H_
#define _FIND_MIN_DIST_H_

#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <omp.h>
#include <set>

struct Line{
    int node;
    int c;

    Line(int _node, int _c){
        node = _node;
        c = _c;
    }

    bool operator< (const Line& o) const{
        if (node < o.node)
            return 1;
        if (node == o.node)
            return c < o.c;

        return 0;
    }
};

typedef std::vector< std::vector<Line> > T_ADJ;
typedef std::vector< std::vector<int> > T_GRAPH;

double findBestPlace( int metodo, const T_ADJ& grafo, int threads );                // Main function
void dijkstra_to(int node, T_GRAPH& vv_dist, const T_ADJ& grafo);                   // Dijkstra algorithm

//! - - - Sequential - - -
int MinMaxDistance(const T_GRAPH& vv_dist );                                        // Find max distance for each vertex
void VertToVertDistanceSeq( T_GRAPH& vv_dist, const T_ADJ& grafo );                 // Find min distance among all vertex

//! - - - Parallel - - -
int MinMaxDistanceParal(const T_GRAPH& vv_dist );                                   // Find max distance for each vertex
void VertToVertDistanceParal1( T_GRAPH& vv_dist, const T_ADJ& grafo, int threads ); // Find min distance among all vertex
void VertToVertDistanceParal2( T_GRAPH& vv_dist, const T_ADJ& grafo, int threads ); // Find min distance among all vertex
void VertToVertDistanceParal3( T_GRAPH& vv_dist, const T_ADJ& grafo, int threads ); // Find min distance among all vertex

#endif
